package com.sky.cqculture.pojo;

import java.util.Date;

public class ShoppingCart {
    private Integer id;         // 购物车ID
    private Integer userId;     // 用户ID
    private Integer productId;  // 商品ID
    private Integer quantity;   // 商品数量
    private Date createTime;    // 创建时间
    private Date updateTime;    // 更新时间
    
    // 扩展字段，用于前端展示
    private Product product;    // 商品信息
    
    // 构造方法
    public ShoppingCart() {}
    
    public ShoppingCart(Integer userId, Integer productId, Integer quantity) {
        this.userId = userId;
        this.productId = productId;
        this.quantity = quantity;
    }
    
    // getter和setter方法
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    
    public Integer getUserId() { return userId; }
    public void setUserId(Integer userId) { this.userId = userId; }
    
    public Integer getProductId() { return productId; }
    public void setProductId(Integer productId) { this.productId = productId; }
    
    public Integer getQuantity() { return quantity; }
    public void setQuantity(Integer quantity) { this.quantity = quantity; }
    
    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }
    
    public Date getUpdateTime() { return updateTime; }
    public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
    
    public Product getProduct() { return product; }
    public void setProduct(Product product) { this.product = product; }
}